Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickTime Components /
Chapter 5 - Sequence Grabber Components / Sequence Grabber Components Reference
Sequence Grabber Component Functions / Working With Video Channels


SGGetVideoCompressor

The SGGetVideoCompressor function allows you to determine a channel's current image-compression parameters.

pascal ComponentResult SGGetVideoCompressor (SGChannel c, 
                              short *depth,
                              compressorComponent *compressor,
                              CodecQ *spatialQuality, 
                              CodecQ *temporalQuality, 
                              long *keyFrameRate);
c
Specifies the reference that identifies the channel for this operation. You obtain this reference from the SGNewChannel function, described on page 5-29.
depth
Contains a pointer to a field that is to receive the depth at which the image is likely to be viewed. Image compressors may use this as an indication of the color or grayscale resolution of the compressed images. If the value returned by this function is 0, the sequence grabber component determines the appropriate value for the source image. Values of 1, 2, 4, 8, 16, 24, and 32 indicate the number of bits per pixel for color images. Values of 33, 34, 36, and 40 indicate 1-bit, 2-bit, 4-bit, and 8-bit grayscale, respectively, for grayscale images. Your program can determine which depths are supported by a given compressor by examining the compressor information record (defined by the CodecInfo data type) returned by the Image Compression Manager's GetCodecInfo function (see the chapter "Image Compression Manager" in Inside Macintosh: QuickTime for more information on the GetCodecInfo function).
If you are not interested in this information, set this parameter to nil.
compressor
Contains a pointer a field that is to receive an image compressor identifier. If you are not interested in this information, set this parameter to nil.
spatialQuality
Contains a pointer to a field that is to receive the desired compressed image quality. See the chapter "Image Compression Manager" in Inside Macintosh: QuickTime for valid values. If you are not interested in this information, set this parameter to nil.
temporalQuality
Contains a pointer to a field that is to receive the desired sequence temporal quality. This parameter governs the level of compression you desire with respect to information between successive frames in the sequence. If the returned value is set to 0, the image compressor is not performing temporal compression on the source video. See the chapter "Image Compression Manager" in Inside Macintosh: QuickTime for other valid values.
If you are not interested in this information, set this parameter to nil.
keyFrameRate
Contains a pointer to a field that is to receive the maximum number of frames allowed between key frames. Key frames provide points from which a temporally compressed sequence may be decompressed. This value controls the frequency at which the image compressor places key frames into the compressed sequence. The compressor determines the optimum placement for key frames based upon the amount of redundancy between adjacent images in the sequence. Consequently, the compressor may insert key frames more frequently than you have requested. However, the compressor will never place key frames less often than is indicated by the setting of the keyFrameRate parameter. The compressor ignores this value if you have not requested temporal compression (that is, you have set the temporalQuality parameter of the SGSetVideoCompressor function to 0).
If you are not interested in this information, set this parameter to nil.
SEE ALSO
You can set these parameters by calling the SGSetVideoCompressor function, which is described in the previous section.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help